home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 September / CHIP Eylül 1998.iso / Slackwar / docs / Danish-HOWTO < prev    next >
Text File  |  1997-01-29  |  34KB  |  871 lines

  1.   The Linux Danish/International HOWTO
  2.   Niels Kristian Bech Jensen, nkbj@image.dk
  3.   v2.0, 23 January 1998
  4.  
  5.   This document describes how to configure Linux and various Linux
  6.   applications for Danish locale standards such as keyboard, font,
  7.   paper-size etc. It is hoped that Linux users from other places in
  8.   Western Europe will find this document useful too.
  9.  
  10.   1.  Introduction
  11.  
  12.   All European users of almost any operating system have two problems:
  13.   The first is to tell the computer that you have a non-American
  14.   keyboard, and the second is to get the computer to display the special
  15.   characters. To make matters worse some applications will also consider
  16.   you an exception if you are not an American and require special
  17.   options or the setting of environment variables.
  18.  
  19.   Under Linux you change the way your computer interprets the keyboard
  20.   with the commands loadkeys and xmodmap. loadkeys will modify the
  21.   keyboard for plain Linux while xmodmap makes the modifications
  22.   necessary when the handshaking between X11 and Linux is imperfect.
  23.  
  24.   To display the characters you need to tell your applications that you
  25.   use the ISO-8859-1 (a.k.a. Latin-1) international set of glyphs. This
  26.   is not always necessary, but a number of key applications need special
  27.   attention.
  28.  
  29.   This HOWTO is intended to tell Danish users how to do this. If you
  30.   continue to have problems after reading this you can try the German
  31.   HOWTO, the Linux Keyboard and Console HOWTO or the ISO 8859-1 National
  32.   Character Set FAQ. Many of the hints contained herein are cribbed from
  33.   there. See section ``Other documents of relevance'' for pointers to
  34.   these documents. You should also send me a mail describing your
  35.   problems.
  36.  
  37.   A final problem is that error-messages, menus and documentation of the
  38.   applications are mostly in English. There is a GNU project under way
  39.   to address this problem. You can see what it is all about by
  40.   downloading the file ABOUT-NLS or the package gettext-0.10.tar.gz (or
  41.   any later version) from your favourite mirror of prep.ai.mit.edu. This
  42.   project needs volunteers for the translations. Send a mail to da-
  43.   request@li.org with the body ``subscribe'' if you want to contribute
  44.   to the Danish part of the project. The documentation in the gettext
  45.   package describes how to use such translations in your own programs.
  46.  
  47.   2.  Keyboard setup
  48.  
  49.   2.1.  Loading a keytable
  50.  
  51.   You have two tools for configuring your keyboard. Under plain Linux
  52.   you have loadkeys and under X11 you have xmodmap.
  53.  
  54.   To try out loadkeys type one of these two commands:
  55.  
  56.        loadkeys /usr/lib/kbd/keytables/dk.map
  57.  
  58.   or
  59.  
  60.   loadkeys /usr/lib/kbd/keytables/dk-latin1.map
  61.  
  62.   The difference between the two keymaps is that dk-latin1.map enables
  63.   `dead' keys while dk.map does not. Dead keys are explained in section
  64.   ``Dead keys and accented characters''. The program loadkeys and the
  65.   keymaps are part of the package kbd-0.??.tar.gz which (with differing
  66.   version numbers ??) is available with all Linux distributions.
  67.  
  68.   Usually loadkeys is executed at boot-time from one of the scripts
  69.   under the directory /etc/rc.d/. Details vary between distributions.
  70.  
  71.   (Note for non-Danish readers: Support for other languages is enabled
  72.   in a similar manner. Use es.map for Spanish keyboards etc.)
  73.  
  74.   Versions of XFree86 up to and including v3.1.2 will normally follow
  75.   the keymap used by plain Linux, but you can modify keyboard behavior
  76.   under X11 with xmodmap. Usually the X11 initialization process will
  77.   run this command automatically if you have a file called .Xmodmap in
  78.   your home directory.
  79.  
  80.   In XFree86 v3.2 and higher you should have the following Keyboard
  81.   section in your /etc/XF86Config file (it is made automatically by the
  82.   program XF86Setup if you choose a Danish keytable):
  83.  
  84.        Section "Keyboard"
  85.           Protocol        "Standard"
  86.           XkbRules        "xfree86"
  87.           XkbModel        "pc101"
  88.           XkbLayout       "dk"
  89.           XkbVariant      "nodeadkeys"
  90.        EndSection
  91.  
  92.   The only keyboard variant available at the moment is "nodeadkeys", but
  93.   dead keys can still be made to work. See section ``Dead keys and
  94.   accented characters'' for more information on this.
  95.  
  96.   2.2.  Getting the AltGr key to work under X11
  97.  
  98.   For versions of XFree86 up to and including v3.1.2 you should edit the
  99.   file /etc/X11/XF86Config (or possibly /etc/XF86Config) and make sure
  100.   the line
  101.  
  102.        RightAlt    ModeShift
  103.  
  104.   appears in the Keyboard section. Usually you can do this by uncomment¡
  105.   ing the appropriate line. In XFree86 v3.1.2 you can use AltGr as an
  106.   alias for RightAlt.
  107.  
  108.   The AltGr key should work as expected in XFree86 v3.2 and higher if
  109.   you choose Danish keyboard support.
  110.  
  111.   2.2.1.  Making {, [, ] and } work under Metro-X
  112.  
  113.   You can't input the characters ``{'' (<AltGr><7>), ``['' (<AltGr><8>),
  114.   ``]'' (<AltGr><9>) and ``}'' (<AltGr><0>) under the Metro-X server.
  115.   This bug has been observed under versions 3.1.5 and 3.1.8 of the
  116.   server.
  117.  
  118.   To correct this bug you have to edit the file
  119.   /usr/X11R6/lib/X11/xkb/symbols/dk and change the lines
  120.  
  121.        key <AE07> {    [               7,           slash      ]       };
  122.        key <AE08> {    [               8,       parenleft      ]       };
  123.        key <AE09> {    [               9,      parenright      ]       };
  124.        key <AE10> {    [               0,           equal      ]       };
  125.  
  126.   to
  127.  
  128.        key <AE07> {    [               7,           slash      ],
  129.                        [       braceleft,        NoSymbol      ]       };
  130.        key <AE08> {    [               8,       parenleft      ],
  131.                        [     bracketleft,        NoSymbol      ]       };
  132.        key <AE09> {    [               9,      parenright      ],
  133.                        [    bracketright,        NoSymbol      ]       };
  134.        key <AE10> {    [               0,           equal      ],
  135.                        [      braceright,        NoSymbol      ]       };
  136.  
  137.   2.3.  Dead keys and accented characters
  138.  
  139.   Dead keys are those that does not type anything until you hit another
  140.   key. Tildes and umlauts are like this by default under plain Linux if
  141.   you use the dk-latin1.map keymap. This is the default behaviour for
  142.   these keys under Microsoft Windows as well.
  143.  
  144.   2.3.1.  Removing dead key functionality
  145.  
  146.   ╖  Removing dead key functionality under plain Linux and XFree86
  147.      v3.1.2
  148.  
  149.      Under plain Linux type
  150.  
  151.        loadkeys dk.map
  152.  
  153.   ╖  Removing dead key functionality under XFree86 v3.2 and higher
  154.  
  155.      Put the following line in the Keyboard section of your
  156.      /etc/XF86Config file:
  157.  
  158.        XkbVariant      "nodeadkeys"
  159.  
  160.   2.3.2.  Invoking dead key functionality
  161.  
  162.   ╖  Invoking dead key functionality under plain Linux
  163.  
  164.      Under plain Linux type
  165.  
  166.        loadkeys dk-latin1.map
  167.  
  168.   ╖  Invoking dead key functionality under X11R6 sessions
  169.  
  170.      First you must make sure you are running XFree86 v3.1.2 or higher.
  171.      Download and install everything related to the newest release if
  172.      you have a lower version number. Neither compose nor dead keys will
  173.      work in X11R6 applications unless these are compiled with support
  174.      for accented (8-bit) character input. A useful example of such an
  175.      application is GNU emacs version 19.30 (or higher.)
  176.  
  177.      Some X11 applications still does not support this input method.
  178.      Eventually this situation might improve, but until that happens you
  179.      can either hack your applications or submit polite bug reports to
  180.      the  program authors. The latter approach is often the most
  181.      efficient. See section ``Programming tips for X11'' for some advice
  182.      on what needs to be done.
  183.  
  184.      Next you will have to map a key to Multi_key (Compose.) The Scroll
  185.      Lock key is most likely already mapped as such if you use XFree86
  186.      v3.1.2 (you can verify this with the program xev,) and it is easy
  187.      to map the right Control key by uncommenting the appropriate line
  188.      in the Keyboard section of the XFree86 configuration file (often
  189.      /etc/XF86Config.) If you wish to use some other key, or if you are
  190.      using XFree86 v3.2 or higher and want to change the default, you
  191.      should put something like
  192.  
  193.        keycode 78 = Multi_key
  194.  
  195.   in your ~/.Xmodmap file. The statement in the example defines Scroll
  196.   Lock as the Compose key. The default Compose key in XFree86 v3.2 and
  197.   higher is <Shift><AltGr>.
  198.  
  199.   XFree86 v3.2 and higher comes without support for the dead keys on the
  200.   standard Danish keyboard. To get this support you have to change a few
  201.   lines in the xkb_symbols "basic" section of the file
  202.   /usr/X11R6/lib/X11/xkb/symbols/dk. The lines
  203.  
  204.        key <AE12> {    [           acute,           grave      ],
  205.                        [             bar,     dead_ogonek      ]       };
  206.        key <AD12> {    [       diaeresis,     asciicircum      ],
  207.                        [      asciitilde,     dead_macron      ]       };
  208.  
  209.   should be changed to
  210.  
  211.   key <AE12> {    [      dead_acute,      dead_grave      ],
  212.                   [             bar,     dead_ogonek      ]       };
  213.   key <AD12> {    [  dead_diaeresis, dead_circumflex      ],
  214.                   [      dead_tilde,     dead_macron      ]       };
  215.  
  216.   After these changes you can get support for dead keys by removing the
  217.   line
  218.  
  219.        XkbVariant      "nodeadkeys"
  220.  
  221.   from the Keyboard section of your /etc/XF86Config file.
  222.  
  223.   (Note for non-Danish readers: There are files for many local keyboard
  224.   maps in /usr/X11R6/lib/X11/xkb/symbols.)
  225.  
  226.   The available keystroke combinations are compiled in
  227.   /usr/X11R6/lib/X11/locale/iso8859-1/Compose. There are some bugs in
  228.   that file you will want to fix:
  229.  
  230.      1. The line reading
  231.  
  232.           <dead_tilde> <space>                    : "~"   tilde
  233.  
  234.      should be changed to
  235.  
  236.           <dead_tilde> <space>                    : "~"   asciitilde
  237.  
  238.      2. In several places asciicircum is misspelled as asciicirum
  239.  
  240.   Finally make sure your shells and/or applications is set up for
  241.   ISO-8859-1 compatibility as described in section ``International char¡
  242.   acter sets in specific applications'' and you should be all set.
  243.  
  244.   2.4.  Making $ (the dollar sign), ° (oslash) and ╪ (Oslash) work
  245.  
  246.   2.4.1.  $ (the dollar sign)
  247.  
  248.   There is a bug in the Danish keymaps causing the dollar sign to be
  249.   accessed with <Shift><4> instead of <AltGr><4> by default. If this is
  250.   a problem for you, determine what keymap you load at boot-time. You
  251.   can find it by looking around in the directory /etc/rc.d/ or simply by
  252.   paying attention to what happens at boot-time.  On my computer the
  253.   relevant keymap is called /usr/lib/kbd/keytables/dk-latin1.map. You
  254.   can fix the problem by changing the line
  255.  
  256.        keycode   5 = four             dollar           dollar
  257.  
  258.   in the keymap file to
  259.  
  260.        keycode   5 = four             currency         dollar
  261.  
  262.   and then loading the keytable as described in section ``Loading a
  263.   keytable''. Currency (dansk: ``soltegn'') is the default <Shift><4>
  264.   character on a Danish keyboard.
  265.  
  266.   This should fix the problem for both X11 and plain Linux.
  267.  
  268.   2.4.2.  ° (oslash) and ╪ (Oslash)
  269.  
  270.   In some older distributions ``°'' and ``╪'' appear as cent and yen.
  271.   Find the line for keycode 40 in the keymap file and change it from
  272.  
  273.        keycode  40 = cent              yen
  274.  
  275.   to
  276.  
  277.        keycode  40 = +oslash           +Ooblique
  278.  
  279.   Note: This bug appears to have been fixed in kbd-0.88.tar.gz and newer
  280.   versions.
  281.  
  282.   The plus signs are necessary to get Caps Lock working properly.
  283.   ``Oslash'' can be used as an alias for ``Ooblique'' in kbd-0.90.tar.gz
  284.   and newer versions.
  285.  
  286.   3.  Display and application setup
  287.  
  288.   Most applications need to be compiled as ``8-bit-clean'' to work well
  289.   with European characters. Some need a few extra hints to get it right.
  290.  
  291.   3.1.  Loading the Latin-1 character set on the console
  292.  
  293.   Execute the following commands under the bash shell:
  294.  
  295.        setfont lat1-16.psf
  296.        mapscrn trivial
  297.        echo -ne '\033(K'
  298.  
  299.   You could also choose to load the font as unicode to ensure that lines
  300.   are displayed correctly in programs such as mc and workbone. Execute
  301.   the following commands to do that:
  302.  
  303.   setfont lat1-16.psf
  304.   loadunimap lat1.uni
  305.   echo -ne '\033(K'
  306.  
  307.   If you use Linux kernels v1.3.1 or higher, you do not need the echo
  308.   command when you load the font as unicode.
  309.  
  310.   Note: This only has effect under plain Linux.
  311.  
  312.   3.2.  Characters you can display under Linux
  313.  
  314.   Type dumpkeys -l | less at the prompt to find out which characters
  315.   that are readily available. You can map them to your keyboard via the
  316.   keymap files mentioned in section ``Loading a keytable''.
  317.  
  318.   3.3.  International character sets in specific applications
  319.  
  320.   A number of applications demand special attention. This section
  321.   describes how to set up configuration files for them.
  322.  
  323.      bash:
  324.         Put the following in your ~/.inputrc file:
  325.  
  326.           set meta-flag on
  327.           set convert-meta off
  328.           set output-meta on
  329.  
  330.      elm:
  331.         Put the following definitions in your ~/.elm/elmrc file:
  332.  
  333.           charset = iso-8859-1
  334.           displaycharset = iso-8859-1
  335.           textencoding = 8bit
  336.  
  337.      This may not work on some versions of elm.
  338.  
  339.      emacs:
  340.         Put the following in your ~/.emacs or the the system-wide
  341.         initialization file (probably /usr/lib/emacs/site-
  342.         lisp/default.el or /usr/share/emacs/site-lisp/default.el):
  343.  
  344.           (standard-display-european t)
  345.           (require 'iso-syntax)
  346.           (set-input-mode (car (current-input-mode))
  347.                   (nth 1 (current-input-mode))
  348.                   0)
  349.  
  350.      You can leave out the first two of the lines above if you have
  351.      installed locale support, and your LC_CTYPE environment variable
  352.      includes one of the strings 8859-1 or 88591. See section ``Locale
  353.      support in libc 5.4.x'' for some information on locales.
  354.  
  355.      Dead keys should work under GNU emacs provided you use GNU emacs
  356.      v19.30 or higher and XFree86 v3.1.2 or higher (it works for me
  357.      anyway,) so do not start researching available elisp packages
  358.      implementing ``electric keys'' or anything like that. If you want
  359.      to implement European keyboard conventions in emacs without
  360.      upgrading, the best choice is probably the remap package available
  361.      from the SunSite DK server (see section ``FTP and Web sites''.)
  362.      There are also two packages called iso-acc.elc and iso-trans.elc
  363.      included with emacs that has similar functionality, but they are
  364.      not nearly as powerful.
  365.  
  366.      groff:
  367.         Issue the command as
  368.  
  369.           groff -Tlatin1 <your_groff_input_file>
  370.  
  371.      Remember to change this in /etc/man.config to get latin1 characters
  372.      working in man (don't remove the -mandoc switch.)
  373.  
  374.      ispell --- Spell checking in Danish:
  375.         First make sure that you install version 3.1 instead of version
  376.         4.0 of ispell. The latter is obsolete and multiple brain-
  377.         damaged. You can download the sources for ispell at the GNU
  378.         archive at prep.ai.mit.edu, and you can get a Danish dictionary
  379.         via FTP from Aalborg University Center
  380.         <ftp://ftp.iesd.auc.dk/pub/packages/dkispell/>. Follow the
  381.         compilation instructions and you should have no trouble (One
  382.         caveat: When defining the variables necessary for compilation
  383.         you must tell ispell that Linux is a SysV type OS by defining
  384.         the variable USG.)
  385.  
  386.         When you have installed the Danish dictionary for ispell you can
  387.         check the spelling of a Danish language file by executing the
  388.         command:
  389.  
  390.           ispell -d danish -T latin1 -w "µ°σ╞╪┼" <your_danish_text_file>
  391.  
  392.      (Note for non-Danish readers: You can find dictionaries for most
  393.      Western languages by reading the file Where included with the
  394.      sources for ispell.)
  395.  
  396.      joe:
  397.         Issue the command as
  398.  
  399.           joe -asis
  400.  
  401.      or put the following in your ~/.joerc file:
  402.  
  403.           -asis
  404.  
  405.      The hyphen character must be in the first column.
  406.  
  407.      kermit:
  408.         This is as close as I can get, but not completely satisfying
  409.         yet. Put the following in your ~/.kermrc file:
  410.  
  411.           set terminal bytesize 8
  412.           set command bytesize 8
  413.           set file bytesize 8
  414.           set language danish
  415.           set file character-set latin1-iso
  416.           set transfer character-set latin1-iso
  417.           set terminal character-set latin1-iso
  418.  
  419.      I think there are more variables to set, but they are hiding. You
  420.      would have to modify these settings if the remote system is DOS or
  421.      OS/2 based.
  422.  
  423.      less:
  424.         Set the following environment variable:
  425.  
  426.           LESSCHARSET=latin1
  427.  
  428.      ls:
  429.         Issue the command as
  430.  
  431.           ls -N
  432.  
  433.      or possibly
  434.  
  435.           ls --8bit
  436.  
  437.      lynx:
  438.         Put the following definition in your ~/.lynxrc file:
  439.  
  440.           character_set=ISO Latin 1
  441.  
  442.      This can also be set via the Options menu in lynx. Type `o' and set
  443.      the relevant option.
  444.  
  445.      man:
  446.         See entry for groff in this section.
  447.  
  448.      metamail:
  449.         Set the following environment variable:
  450.  
  451.           MM_CHARSET=ISO-8859-1
  452.  
  453.      nn:
  454.         Put the following in your ~/.nn/init file:
  455.  
  456.           set data-bits 8
  457.  
  458.      pine:
  459.         Put the following definition in your ~/.pinerc file:
  460.  
  461.           character-set=ISO-8859-1
  462.  
  463.      This can also be set via the Setup, Config menu option in pine.
  464.  
  465.      rlogin:
  466.         Issue the command as
  467.  
  468.           rlogin -8 foo.bar.dk
  469.  
  470.      tcsh:
  471.         Put the following in your /etc/csh.login or ~/.tcshrc file:
  472.  
  473.           setenv LANG C
  474.  
  475.      Actually you just have to define one of the environment variables
  476.      LANG or LC_CTYPE. The value does not matter. Read the tcsh man page
  477.      for more information.
  478.  
  479.      telnet:
  480.         Put one line of the following type in your ~/.telnetrc file for
  481.         each host you want to log on to using telnet:
  482.  
  483.           <hostname> set outbinary true
  484.  
  485.      Example:
  486.  
  487.           localhost set outbinary true
  488.           foo.bar.dk set outbinary true
  489.  
  490.      TeX/LaTeX:
  491.         There are several problems with TeX/LaTeX: You want LaTeX to
  492.         understand the special characters and you do not want LaTeX to
  493.         put in English words like ``Chapter'' at the beginning of every
  494.         chapter or use English typesetting conventions.
  495.  
  496.         Under LaTeX2e the header of your input file should look
  497.         something like this:
  498.  
  499.           \documentclass[a4paper]{article}
  500.  
  501.           \usepackage[latin1]{inputenc}
  502.           \usepackage{t1enc}
  503.           \usepackage[danish]{babel}
  504.  
  505.      The first usepackage statement ensures that LaTeX will interpret
  506.      European characters correctly, so you do not have to use escape
  507.      codes for European characters. The second is not strictly
  508.      necessary; but it is recommended to include it to use the DC fonts
  509.      (which of course must be installed.) The DC fonts should soon be
  510.      replaced by the newer EC fonts. These two packages are most likely
  511.      included in your LaTeX distribution. The last usepackage statement
  512.      defines a range of standards for typesetting Danish texts.
  513.  
  514.      If you use the Debian distribution (or older Slackware) you will
  515.      have to install Danish hyphenation tables yourself (dansk:
  516.      ``hyphenation''=``orddeling''.) These are available from Aalborg
  517.      University Center <ftp://ftp.iesd.auc.dk/pub/packages/>. The files
  518.      you need are dkhyphen.tex, dkcommon.tex and dkspecial.tex. If you
  519.      use the teTeX distribution (distributed with e.g. Red Hat and
  520.      S.u.S.E.)  you already have the relevant files. Essentially you
  521.      need to put these into the directory containing international
  522.      hyphenation tables, edit the appropriate language dependency file
  523.      (usually called language.dat) and finally rebuild LaTeX with
  524.      initex. Before you do anything, please make sure you know what
  525.      files you are changing and back them up in advance.
  526.  
  527.      If you use NTeX (distributed with the Slackware distribution) you
  528.      will have a configuration script called ntm-ltx.cfg located in
  529.      /usr/lib/texmf/tools/. In that case put the hyphenation tables in
  530.      the the relevant directory (most likely called
  531.      /usr/lib/texmf/tex/hyphenation/) and run the script. It will guide
  532.      you through the various steps described below. If you use teTeX
  533.      there is a somewhat more advanced program called texconfig to help
  534.      you.
  535.  
  536.      Below is a description for enabling Danish hyphenation by hand. If
  537.      it looks vague it is because TeX/LaTeX installations differ very
  538.      much in their choice of path-names.
  539.  
  540.         1. Find out where you have the hyphenation tables. Under NTeX
  541.            they are in /usr/lib/texmf/tex/hyphenation/, under teTeX in
  542.            /usr/lib/texmf/texmf/tex/generic/hyphen/. Try issuing the
  543.            command find /usr/lib/ -iname '*hyph*' -print if you cannot
  544.            find the directory.
  545.  
  546.         2. Check if the hyphenation tables are already there. If not put
  547.            the hyphenation tables mentioned above in this directory.
  548.  
  549.         3. Edit the file (probably) called language.dat. In the teTeX
  550.            distribution you can just uncomment the appropriate line.
  551.            Otherwise insert a line reading
  552.  
  553.              danish dkhyphen.tex
  554.  
  555.         If you have difficulty finding language.dat try issuing the com¡
  556.         mand find /usr/lib/ -name language.dat -print
  557.  
  558.         4. Find and back up the file latex.fmt. It could be in a variety
  559.            of places. Use find /usr/lib/ -name latex.fmt -print to find
  560.            it.
  561.  
  562.         5. Go to the directory where you found latex.fmt. Issue the
  563.            command initex latex.ltx. Pray. If everything went well you
  564.            now have a new version of latex.fmt.
  565.  
  566.         6. You can now use
  567.  
  568.              \usepackage[danish]{babel}
  569.  
  570.         in your LaTeX headers. Hyphenation should be reasonably correct,
  571.         quotation marks follow Danish conventions, chapters are now
  572.         called ``Kapitel'' instead of ``Chapter'' etc.
  573.  
  574.      All new Linux distributions now includes LaTeX2e.
  575.  
  576.      (Note for non-Danish readers: The process is similar for other
  577.      Western European languages, and the necessary files are normally
  578.      included in the Linux distributions.)
  579.  
  580.      In LaTeX 2.09, use
  581.  
  582.           \documentstyle[a4,isolatin]{article}
  583.  
  584.      to include support for ISO-8859-1 characters and European paper
  585.      sizes.
  586.  
  587.      isolatin.sty is available from all DANTE servers (see section ``FTP
  588.      and Web sites'') and from Michael Gschwind's FTP site
  589.      <ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit>. It should also be
  590.      included in the standard Linux distributions.
  591.  
  592.      Note: Some people prefer using emacs in a special mode which
  593.      translates ``special'' letters into TeX escape codes, but this
  594.      method should be obsolete by now.
  595.  
  596.      tin:
  597.         Put the following definitions in your ~/.tin/headers file:
  598.  
  599.           Mime-Version: 1.0
  600.           Content-Type: text/plain; charset=iso-8859-1
  601.           Content-Transfer-Encoding: 8bit
  602.  
  603.      Now you can post messages with the proper Danish characters in the
  604.      message body.
  605.  
  606.   4.  Miscellaneous problems
  607.  
  608.   4.1.  Time zone
  609.  
  610.   Denmark is placed in the Central European Time zone (CET or MET,)
  611.   which (in the winter) is equivalent to Greenwich Mean Time plus 1
  612.   (GMT+1.) You set the time zone on a Linux system by making a symbolic
  613.   link between /usr/lib/zoneinfo/localtime and the file in
  614.   /usr/lib/zoneinfo/ with a name corresponding to your zone or country.
  615.   Danes will want to execute one of the commands
  616.  
  617.        ln -sf /usr/lib/zoneinfo/MET /etc/localtime
  618.  
  619.   or
  620.  
  621.        ln -sf /usr/lib/zoneinfo/Europe/Copenhagen /etc/localtime
  622.  
  623.   This automatically sets Daylight Saving Time (GMT+2) in the summer.
  624.  
  625.   You synchronize the system time with the CMOS clock by issuing the
  626.   command clock as root. If your CMOS clock is set to GMT (a.k.a. UTC
  627.   --- the standard on proper Unix systems) use
  628.  
  629.        clock -u -s
  630.  
  631.   or if your CMOS clock is set to local time use
  632.  
  633.        clock -s
  634.  
  635.   4.2.  A4 papersize
  636.  
  637.   ╖  dvips: Edit the file /usr/lib/texmf/dvips/config.ps or ~/.dvips.
  638.  
  639.   ╖  ghostscript: Add the command line option -sPAPERSIZE=a4.
  640.  
  641.   ╖  ghostview: Define the following Xresource:
  642.  
  643.        Ghostview.pageMedia:  A4
  644.  
  645.   ╖  TeX/LaTeX: See the entry for TeX/LaTeX in section ``International
  646.      character sets in specific applications''.
  647.  
  648.   ╖  xdvi: Define the Xresource
  649.  
  650.        XDvi.paper:     a4
  651.  
  652.   4.3.  Text file formats for other platforms
  653.  
  654.   You can translate files between an ISO-8859-1 formatted text file and
  655.   e.g. a DOS text file using codepage 850 with the recode package. A DOS
  656.   file called foo.txt would be translated into a proper Unix file with
  657.   the command
  658.  
  659.        recode cp850:latin1 foo.txt
  660.  
  661.   Recode is available as recode-3.4.tar.gz from all mirrors of
  662.   prep.ai.mit.edu.
  663.  
  664.   5.  Locale support in libc 5.4.x and higher
  665.  
  666.   The locale support has been updated in libc 5.4.x. You can avoid many
  667.   of the individual programs setups described in section ``International
  668.   character sets in specific applications'' if the programs on your
  669.   system is prepared for locale support. The Debian distribution comes
  670.   with this support if you install the wg15-locale package. Read the
  671.   Locales mini-HOWTO if you want to set up locale support on a non-
  672.   Debian system with libc 5.4.x. Systems with GNU libc 2 (libc 6.x) also
  673.   support locales.
  674.  
  675.   To enable support for the Danish locale on a system with locale
  676.   support you just have to set one of the following environment
  677.   variables:
  678.  
  679.        LANG=da_DK
  680.  
  681.   or
  682.        LC_ALL=da_DK
  683.  
  684.   Try da_DK.ISO_8859-1 if da_DK does not work.
  685.  
  686.   Both environment variables set all the individual locale catgories.
  687.   You can also set a single locale category by using the name of the
  688.   category as an environment variable. The locale catogories are:
  689.  
  690.        Locale category         Application
  691.        ---------------         -----------
  692.        LC_COLLATE              Collation of strings (sort order.)
  693.        LC_CTYPE                Classification and conversion of characters.
  694.        LC_MESSAGES             Translations of yes and no.
  695.        LC_MONETARY             Format of monetary values.
  696.        LC_NUMERIC              Format of non-monetary numeric values.
  697.        LC_TIME                 Date and time formats.
  698.        LC_ALL                  Sets all of the above (overrides all of them.)
  699.        LANG                    Sets all the categories, but can be overridden
  700.                                by the individual locale categories.
  701.  
  702.   A few programs such as bash and GNU emacs still need specific setup as
  703.   described in section ``International character sets in specific
  704.   applications'', but most should work without further attention.
  705.   Programs such as nvi which did not work with 8 bit characters before
  706.   should work now.
  707.  
  708.   Locale support should be more common as distributions based on the new
  709.   GNU libc 2 become available. Beware that although Red Hat Linux 5.0
  710.   comes with GNU libc 2, the locale support is not working. You have to
  711.   run this script to make it work (ignore the warnings):
  712.  
  713.   #!/bin/sh
  714.  
  715.   localedef -c -i en_DK -f ISO-8859-1 en_DK
  716.   localedef -c -i sv_SE -f ISO-8859-1 sv_SE
  717.   localedef -c -i fi_FI -f ISO-8859-1 fi_FI
  718.   localedef -c -i sv_FI -f ISO-8859-1 sv_FI
  719.   localedef -c -i ro_RO -f ISO-8859-1 ro_RO
  720.   localedef -c -i pt_PT -f ISO-8859-1 pt_PT
  721.   localedef -c -i no_NO -f ISO-8859-1 no_NO
  722.   localedef -c -i nl_NL -f ISO-8859-1 nl_NL
  723.   localedef -c -i fr_BE -f ISO-8859-1 fr_BE
  724.   localedef -c -i nl_BE -f ISO-8859-1 nl_BE
  725.   localedef -c -i da_DK -f ISO-8859-1 da_DK
  726.   localedef -c -i kl_GL -f ISO-8859-1 kl_GL
  727.   localedef -c -i it_IT -f ISO-8859-1 it_IT
  728.   localedef -c -i is_IS -f ISO-8859-1 is_IS
  729.   localedef -c -i fr_LU -f ISO-8859-1 fr_LU
  730.   localedef -c -i fr_FR -f ISO-8859-1 fr_FR
  731.   localedef -c -i de_DE -f ISO-8859-1 de_DE
  732.   localedef -c -i de_CH -f ISO-8859-1 de_CH
  733.   localedef -c -i fr_CH -f ISO-8859-1 fr_CH
  734.   localedef -c -i en_CA -f ISO-8859-1 en_CA
  735.   localedef -c -i fr_CA -f ISO-8859-1 fr_CA
  736.   localedef -c -i fo_FO -f ISO-8859-1 fo_FO
  737.   localedef -c -i et_EE -f ISO-8859-1 et_EE
  738.   localedef -c -i es_ES -f ISO-8859-1 es_ES
  739.   localedef -c -i en_US -f ISO-8859-1 en_US
  740.   localedef -c -i en_GB -f ISO-8859-1 en_GB
  741.   localedef -c -i en_IE -f ISO-8859-1 en_IE
  742.   localedef -c -i de_LU -f ISO-8859-1 de_LU
  743.   localedef -c -i de_BE -f ISO-8859-1 de_BE
  744.   localedef -c -i de_AT -f ISO-8859-1 de_AT
  745.   localedef -c -i sl_SI -f ISO-8859-2 sl_SI
  746.   localedef -c -i ru_RU -f ISO-8859-5 ru_RU
  747.   localedef -c -i pl_PL -f ISO-8859-2 pl_PL
  748.   localedef -c -i lv_LV -f BALTIC lv_LV
  749.   localedef -c -i lt_LT -f BALTIC lt_LT
  750.   localedef -c -i iw_IL -f ISO-8859-8 iw_IL
  751.   localedef -c -i hu_HU -f ISO-8859-2 hu_HU
  752.   localedef -c -i hr_HR -f ISO-8859-4 hr_HR
  753.   localedef -c -i gr_GR -f ISO-8859-7 gr_GR
  754.  
  755.   6.  Programming tips for X11
  756.  
  757.   Displaying 8-bit charaters is easy. You can use them just as you would
  758.   use 7-bit ASCII. Getting applications to accept input of special
  759.   characters is an entirely different matter.
  760.  
  761.   If you are using e.g. the Xt toolkit and a widget set like Motif you
  762.   need only add one line to your program. As your first call to Xt use
  763.   XtSetLanguageProc. Like this:
  764.  
  765.            int main (int argc, char** argv)
  766.            {
  767.                ...
  768.                XtSetLanguageProc (NULL, NULL, NULL);
  769.                top = XtAppInitialize ( ... );
  770.                ...
  771.            }
  772.  
  773.   Now your program will automagically look up the LC_CTYPE variable and
  774.   interpret dead keys etc. according to the Compose tables in
  775.   /usr/lib/X11/locale/. This should work for all Western European key¡
  776.   board layouts and is entirely portable. As XFree86 multilanguage sup¡
  777.   port gets better your program will also be useful in Eastern Europe
  778.   and the Middle East.
  779.  
  780.   This method of input is supported by Xt, Xlib and Motif v1.2 (and
  781.   higher.) According to the information I have available it is only
  782.   partially supported by Xaw. If you have further information on this
  783.   subject I would like to hear from you.
  784.  
  785.   This section was adapted from a more extensive discussion in Michael
  786.   Gschwind's Programming for Internationalization. See section ``Other
  787.   documents of relevance'' for a pointer to that document.
  788.  
  789.   7.  Getting X11 applications to speak Danish
  790.  
  791.   To get Danish texts on menus, buttons, etc. in a well behaved X11
  792.   application, you just have to translate the resource strings defining
  793.   the texts. Jacob Nordfalk has done such translations for a lot of
  794.   applications including Netscape and Ghostview. The translations and a
  795.   description of how to install them can be found on his homepage
  796.   <http://alf.nbi.dk/~nordfalk/ovs/>.
  797.  
  798.   8.  References and FTP sites
  799.  
  800.   8.1.  Other documents of relevance
  801.  
  802.   The HOWTOs ought to be available from all mirrors of sunsite.unc.edu
  803.   and tsx-11.mit.edu. A Danish mirror at the Web is SunSite DK
  804.   <http://sunsite.auc.dk/ldp/HOWTO/>.
  805.  
  806.   The German HOWTO (in German) by Winfried Trⁿmper. A lot of other
  807.   national HOWTOs such as Finnish, Spanish and Polish are also available
  808.   in the native languages.
  809.  
  810.   The Linux Keyboard and Console HOWTO by Andries Brouwer.
  811.  
  812.   The Locales mini-HOWTO by Peeter Joot.
  813.  
  814.   The ISO 8859-1 National Character Set FAQ and Programming for
  815.   Internationalization (plus much more) by Michael Gschwind is available
  816.   from his homepage <http://www.vlsivie.tuwien.ac.at/mike/i18n.html>.
  817.  
  818.   8.2.  FTP and Web sites
  819.  
  820.   The Linux Danish/International HOWTO has its own homepage
  821.   <http://www.image.dk/~nkbj/>, which always has the latest version on-
  822.   line. It also has other informations for Danish users of Linux.
  823.  
  824.   This FTP site at Aalborg University Center (AUC)
  825.   <ftp://ftp.iesd.auc.dk/pub/packages/> has Danish hyphenation tables,
  826.   dictionary for ispell etc. AUC is also the home of SunSite DK
  827.   <ftp://sunsite.auc.dk/pub/os/linux/> which has the Debian and Red Hat
  828.   distributions, the latest kernels, the Linux Documentation Project
  829.   <http://sunsite.auc.dk/ldp/>, mirrors of sunsite.unc.edu
  830.   <ftp://sunsite.auc.dk/pub/os/linux/sunsite/> and the GNU archives
  831.   <ftp://sunsite.auc.dk/pub/gnu/>, and the remap package for emacs
  832.   <ftp://sunsite.auc.dk/packages/auctex/>.
  833.  
  834.   SunSite <ftp://sunsite.unc.edu/pub/Linux/> and mirrors.  doc/howto has
  835.   the above mentioned HOWTOs. utils/nls and subdirectories contain files
  836.   related to National Language Support.  Developers should take a look
  837.   at locale-tutorial-0.8.txt.gz, locale-pack-0.8.tar.gz and cat-
  838.   pack.tar.gz.
  839.  
  840.   The GNU archives <ftp://prep.ai.mit.edu/pub/gnu/> has the recode
  841.   package for character table conversion, the ABOUT-NLS file and the
  842.   gettext package for message translation of some GNU applications and
  843.   (of course) the latest versions of GNU emacs.
  844.  
  845.   The DANTE FTP site <ftp://ftp.dante.de/> has everything needed for TeX
  846.   and LaTeX support.
  847.  
  848.   9.  Post-amble: Acknowledgments and Copyright
  849.  
  850.   Thanks to Peter Dalgaard, Anders Majland, Jon Haugsand, Jacob
  851.   Nordfalk, the authors of the German HOWTO, Michael Gschwind and
  852.   numerous others for suggestions and help with several questions. And a
  853.   big thanks to the people at Aalborg University Center for writing and
  854.   making available several of the packages described in this document. A
  855.   special Thank You to Thomas Petersen; the original author of this
  856.   document.
  857.  
  858.   9.1.  Disclaimer
  859.  
  860.   Although the information given in this document is believed to be
  861.   correct, the author will accept no liability for the content of this
  862.   document. Use the tips and examples given herein at your own risk.
  863.  
  864.   9.2.  Copyright
  865.  
  866.   Copyright (c) 1996 by Thomas Petersen. Copyright (c) 1997, 1998 by
  867.   Niels Kristian Bech Jensen. This document may be distributed only
  868.   subject to the terms and conditions set forth in the LDP license
  869.   <http://sunsite.unc.edu/LDP/LICENSE.html>.
  870.  
  871.